package to;

public class WorkerTO {
	private String workerId;
	private String lineId;
	private String lineName;
	private OrderTO order;
	
	public WorkerTO(){}

	public WorkerTO(String workerId, String lineId, String lineName,
			OrderTO order) {
		super();
		this.workerId = workerId;
		this.lineId = lineId;
		this.lineName = lineName;
		this.order = order;
	}

	public String getWorkerId() {
		return workerId;
	}

	public void setWorkerId(String workerId) {
		this.workerId = workerId;
	}

	public String getLineId() {
		return lineId;
	}

	public void setLineId(String lineId) {
		this.lineId = lineId;
	}

	public String getLineName() {
		return lineName;
	}

	public void setLineName(String lineName) {
		this.lineName = lineName;
	}

	public OrderTO getOrder() {
		return order;
	}

	public void setOrder(OrderTO order) {
		this.order = order;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((lineId == null) ? 0 : lineId.hashCode());
		result = prime * result
				+ ((lineName == null) ? 0 : lineName.hashCode());
		result = prime * result + ((order == null) ? 0 : order.hashCode());
		result = prime * result
				+ ((workerId == null) ? 0 : workerId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		WorkerTO other = (WorkerTO) obj;
		if (lineId == null) {
			if (other.lineId != null)
				return false;
		} else if (!lineId.equals(other.lineId))
			return false;
		if (lineName == null) {
			if (other.lineName != null)
				return false;
		} else if (!lineName.equals(other.lineName))
			return false;
		if (order == null) {
			if (other.order != null)
				return false;
		} else if (!order.equals(other.order))
			return false;
		if (workerId == null) {
			if (other.workerId != null)
				return false;
		} else if (!workerId.equals(other.workerId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "WorkerTO [workerId=" + workerId + ", lineId=" + lineId
				+ ", lineName=" + lineName + ", order=" + order + "]";
	}

	

}
